home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / INTERVIE / BTABLE.H < prev    next >
C/C++ Source or Header  |  1992-03-25  |  914b  |  42 lines

  1. /*
  2.  * Object association table.
  3.  */
  4.  
  5. #ifndef BitmapTable_h
  6. #define BitmapTable_h
  7.  
  8. #include <InterViews\table2.h>
  9.  
  10. class Bitmap;
  11. class BitmapTableEntry;
  12.  
  13. class BitmapTable : public Table2 {
  14. public:
  15.     BitmapTable(int);
  16.     void Insert(unsigned long, int, class Bitmap*);
  17.     boolean Find(class Bitmap*&, unsigned long, int);
  18.     void Remove(unsigned long, int);
  19. };
  20.  
  21. inline BitmapTable::BitmapTable (int n) : (n) {}
  22.  
  23. inline void BitmapTable::Insert (unsigned long k1, int k2, class Bitmap* v) {
  24.     Table2::Insert((void*)k1, (void*)k2, (void*)v);
  25. }
  26.  
  27. inline boolean BitmapTable::Find (class Bitmap*& v, unsigned long k1, int k2) {
  28.     void* vv;
  29.  
  30.     boolean b = Table2::Find(vv, (void*)k1, (void*)k2);
  31.     if (b) {
  32.     v = (class Bitmap*)vv;
  33.     }
  34.     return b;
  35. }
  36.  
  37. inline void BitmapTable::Remove (unsigned long k1, int k2) {
  38.     Table2::Remove((void*)k1, (void*)k2);
  39. }
  40.  
  41. #endif
  42.